package com.uzai.console.vo.wechatprivate.friendrequest;

import com.uzai.common.enums.DeviceTypeEnum;
import com.uzai.console.enums.FriendRequestScene;
import com.uzai.console.enums.ReqUserNotPassTypeEnum;
import com.uzai.console.enums.WxworkFriendRequestScene;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author liuqi
 * @date 2021年09月01日 18:06
 */
@ApiModel("好友请求返回对象")
public class FriendRequestInfoVo {

    @ApiModelProperty("主键id，（添加时不需要）")
    private String id;

    @ApiModelProperty("运营商ID")
    private Long merId;

    @ApiModelProperty("头像")
    private String headImg;

    @ApiModelProperty("微信id")
    private String wxid;

    @ApiModelProperty("微信昵称")
    private String nickName;

    @ApiModelProperty("性别（0-未知；1-男；2-女）")
    private Integer gender;

    @ApiModelProperty("机器人唯一id")
    private Long deviceUniqueId;

    @ApiModelProperty("机器人微信id")
    private String deviceId;

    @ApiModelProperty("机器人昵称")
    private String deviceName;

    @ApiModelProperty("机器人备注")
    private String deviceRemark;

    @ApiModelProperty("请求添加好友的来源(个人微信{17-个人微信卡片添加；14-个人微信群内添加；30个人微信扫描二维码添加；3个人微信搜索微信号添加; 1-个人微信QQ搜索添加}；企业微信{1-企业微信扫描二维码添加；2-通过手机号搜索添加；3-好友分享名片添加；4-通过群添加})")
    private Integer scene;

    @ApiModelProperty("请求添加好友的来源对应的名称“)")
    private String sceneName;

    @ApiModelProperty("设备类型id")
    private Integer deviceType;

    @ApiModelProperty("上级主键id")
    private Long inviterId;

    @ApiModelProperty("上级微信id")
    private String inviterWxid;

    @ApiModelProperty("上级微信昵称")
    private String inviterNickname;

    @ApiModelProperty("请求时间")
    private Integer reqTime;

    @ApiModelProperty("请求消息")
    private String reqMsg;

    @ApiModelProperty("国家")
    private String country;

    @ApiModelProperty("省份")
    private String province;

    @ApiModelProperty("城市")
    private String city;

    @ApiModelProperty("状态（0-新数据，1已通过，2已忽略; 3-未通过）")
    private Integer status;

    @ApiModelProperty("未通过类型(0-未知原因；1-黑名单；2-达到日限；3-性别拦截；4-夜间不通过; 5-关键词过滤)")
    private int notPassType;

    @ApiModelProperty("未通过类型名称(0-未知原因；1-黑名单；2-达到日限；3-性别拦截；4-夜间不通过; 5-关键词过滤)")
    private String notPassTypeName;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getMerId() {
        return merId;
    }

    public void setMerId(Long merId) {
        this.merId = merId;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    public String getWxid() {
        return wxid;
    }

    public void setWxid(String wxid) {
        this.wxid = wxid;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public Long getDeviceUniqueId() {
        return deviceUniqueId;
    }

    public void setDeviceUniqueId(Long deviceUniqueId) {
        this.deviceUniqueId = deviceUniqueId;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getDeviceRemark() {
        return deviceRemark;
    }

    public void setDeviceRemark(String deviceRemark) {
        this.deviceRemark = deviceRemark;
    }

    public Integer getScene() {
        return scene;
    }

    public void setScene(Integer scene) {
        this.scene = scene;
    }

    public Integer getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(Integer deviceType) {
        this.deviceType = deviceType;
    }

    public Long getInviterId() {
        return inviterId;
    }

    public void setInviterId(Long inviterId) {
        this.inviterId = inviterId;
    }

    public String getInviterWxid() {
        return inviterWxid;
    }

    public void setInviterWxid(String inviterWxid) {
        this.inviterWxid = inviterWxid;
    }

    public String getInviterNickname() {
        return inviterNickname;
    }

    public void setInviterNickname(String inviterNickname) {
        this.inviterNickname = inviterNickname;
    }

    public Integer getReqTime() {
        return reqTime;
    }

    public void setReqTime(Integer reqTime) {
        this.reqTime = reqTime;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getReqMsg() {
        return reqMsg;
    }

    public void setReqMsg(String reqMsg) {
        this.reqMsg = reqMsg;
    }

    public int getNotPassType() {
        return notPassType;
    }

    public void setNotPassType(int notPassType) {
        this.notPassType = notPassType;
    }

    //17-个人微信卡片添加；14-个人微信群内添加；30个人微信扫描二维码添加；3个人微信搜索微信号添加; 1-企业微信扫描二维码添加；2-通过手机号搜索添加；3-好友分享名片添加；4-通过群内添加
    public String getSceneName() {
        if(scene == null){
            return "";
        }
        //个人微信好友请求
        if(getDeviceType().intValue() == DeviceTypeEnum.DT_PC_WECHAT_VALUE || getDeviceType().intValue() == DeviceTypeEnum.DT_ANDROID_WECHAT_VALUE){
            FriendRequestScene friendRequestScene = FriendRequestScene.getById(scene);
            if(friendRequestScene != null){
                return friendRequestScene.getLabel();
            }
        }else if(getDeviceType().intValue() == DeviceTypeEnum.DT_WORK_WECHAT_VALUE || getDeviceType().intValue() == DeviceTypeEnum.DT_ANDROID_WORK_WECHAT_VALUE){ //企业微信好友请求
            WxworkFriendRequestScene wxworkFriendRequestScene = WxworkFriendRequestScene.getById(scene);
            if(wxworkFriendRequestScene != null){
                return wxworkFriendRequestScene.getLabel();
            }
        }
        return "";
    }

    public void setSceneName(String sceneName) {
        this.sceneName = sceneName;
    }

    public String getNotPassTypeName() {
        ReqUserNotPassTypeEnum reqUserNotPassTypeEnum = ReqUserNotPassTypeEnum.getById(getNotPassType());
        if(reqUserNotPassTypeEnum != null){
            return reqUserNotPassTypeEnum.getDesc();
        }else{
            return "";
        }
    }

    public void setNotPassTypeName(String notPassTypeName) {
        this.notPassTypeName = notPassTypeName;
    }
}
